package com.shigen.file.exception;


import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务逻辑异常
 *
 * @author shigenfu
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends RuntimeException {

  protected Integer code;
  protected String label;
  protected String stackMsg;

  public BusinessException() {
  }

  public BusinessException(Integer code, String label) {
    super(label);
    this.code = code;
  }

  public BusinessException(String label) {
    super(label);
    this.code = 500;
    this.label = label;
  }
}
